package com.yict.csms.resourceplan.service.impl;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yict.common.service.impl.BaseServiceImpl;
import com.yict.csms.resourceplan.dao.IDataperDao;
import com.yict.csms.resourceplan.service.IDataperService;
import com.yict.csms.system.entity.BudgetNum;
import com.yict.csms.system.entity.Dataper;

@Service("dataperService")
public class DataperServiceImpl extends BaseServiceImpl<Dataper, Long, IDataperDao> implements IDataperService {

	
	/**
	 * 根据id查找实体
	 * @param ids
	 * @return
	 */
	public List<Dataper> listByIds(Collection<Long> ids){
		if(ids == null || ids.size() == 0) return new ArrayList<Dataper>();
		String hql = "from Dataper t where cwtId in (:ids)";
		Map<String,Object> map = new HashMap<String, Object>();
		map.put("ids", ids);
		return getBaseDao().list(hql,map, 0, 0);
	}
	@Resource(name = "dataperDao")
	public void setBaseDao(IDataperDao dao){
		super.setBaseDao(dao);
	}
}
